import javax.print.DocFlavor;
import java.util.ArrayList;
import java.util.Scanner;

public class Test {
     public static void main(String[] args) {
         /*
        Scanner scanner = new Scanner(System.in);
        String sum = scanner.nextLine();
        StringBuilder stringBuilder = new StringBuilder();
        for (int i = 0; i < sum.length(); i++) {
            if(i == 0){
                stringBuilder.append(sum.charAt(i));
            }
            if(sum.charAt(i) == ' '){
                char ch = sum.charAt(i+1);
                ch = Character.toUpperCase(ch);
                stringBuilder.append(ch);
            }
        }

        System.out.println(stringBuilder.toString());
        
     */
         Scanner scanner = new Scanner(System.in);
         int n = scanner.nextInt();
         ArrayList<ArrayList<Integer>> list = new ArrayList<>();
         for (int i = 0; i < n; i++) {
             ArrayList<Integer> cur = new ArrayList<>();
             for (int j = 0; j <= i; j++) {
                 if(j == 0 || i == j){
                     cur.add(1);
                 }else {
                     int x = list.get(i-1).get(j) +
                             list.get(i-1).get(j - 1);
                     cur.add(x);
                 }
             }
             list.add(cur);
         }
         for (int i = 0; i < list.size(); i++) {
             for (int x: list.get(i)) {
                 System.out.print(x + " ");
             }
             System.out.println();
         }
         
    }
    
}
